package com.openweixin.sheknows.service.impl;
import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.openweixin.sheknows.dao.UserNewAnswerDao;
import com.openweixin.sheknows.domain.UserNewAnswer;
import com.openweixin.sheknows.service.UserNewAnswerService;
@Service
public class UserNewAnswerServiceImpl extends BaseServiceImpl<UserNewAnswer, Integer> implements UserNewAnswerService { 
	@Resource
	public void setBaseDao(UserNewAnswerDao dao) {
		this.unaDao = dao;
		super.setBaseDao(dao);
	}
	private UserNewAnswerDao unaDao;

	@Override
	public boolean hasNewAnswer(Integer uid) {
		return unaDao.getNewAnswerCountByUid(uid) > 0; //查询数据库新回答的条数大于0来判断有新的回复
	}

	@Override
	public int deleteByUid(Integer uid) {
		return unaDao.deleteByUid(uid);
	}
	
	
}
